package com.huarui.part.model;

import java.math.BigDecimal;
import java.util.Date;

import org.apache.commons.lang.StringUtils;
import org.ewaf.framework.model.BaseDataObject;

/**
 * 零件属性类
 * 
 * @author xu
 * 
 */
public class PartProperty extends BaseDataObject {

	private static final long serialVersionUID = -713383448014210425L;
	
	public static final String PUBLICANLEVEL_NOPUBLIC="2";
	
	public static final Integer QUOTATIONQTY_MAX=20;
	
	public static final Integer QUOTATIONQTY_MIN=1;
	
	public static final Integer GMTLASTTYPE_QUOTATION=1;
	
	public static final Integer GMTLASTTYPE_SOLD=2;
	/**
	 * 主键　
	 */
	private Integer id;
	/**
	 * 所属公司的ID
	 */
	private Integer companyId;
	/**
	 * 零件ID
	 */
	private Integer partId;
	/**
	 * 编码(冗余字段)
	 */
	private String code;
	/**
	 * 来源(0=原厂，1=合作厂中国，2=合作厂进口，3=非合作厂中国，4=非合作厂进口)
	 */
	private Integer source;
	/**
	 * 零件名称((冗余字段))
	 */
	private String name;
	/**
	 * 英文名称(冗余字段)
	 */
	private String nameEn;
	/**
	 * 拼音码(冗余字段)
	 */
	private String pyCode;
	/**
	 * 计量单位(冗余字段)
	 */
	private String measurementUnit;
	/**
	 * 零件分类(冗余字段)
	 */
	private Integer partCategoryId;
	/**
	 * 一级分类名称(冗余字段)
	 */
	private String level1Name;
	/**
	 * 二级分类名称(冗余字段)
	 */
	private String level2Name;
	/**
	 * 一级分类ID(冗余字段)
	 */
	private Integer level1Id;
	/**
	 * 耐用性(消耗件,易损件,维修件,基础件,肇事件)(冗余字段)
	 */
	private String durability;
	/**
	 * 成本价(平均后的成本)
	 */
	private BigDecimal cost;
	/**
	 * 最低售价
	 */
	private BigDecimal minPrice;
	/**
	 * 保险价
	 */
	private BigDecimal insurancePrice;
	/**
	 * 上限库存数
	 */
	private Integer maxOnHand;
	/**
	 * 下限库存数
	 */
	private Integer minOnHand;
	/**
	 * 库存数(总数)
	 */
	private Integer onHand;
	/**
	 * 在途数
	 */
	private Integer onWay;
	/**
	 * 公开级别（0 =都公开，1=对客户公司，2=不公开）
	 */
	private String publicanLevel ;
	/**
	 * 互换码
	 */
	private String swapCode;
	private Date gmtCreate;
	private Date gmtModify;
    /**
     * 是否删除 
    */
   private boolean isDelete;
   private String brand;
   private BigDecimal retailPrice;
   private String carModel;
   private String origin;
   private Integer quotationQty;
   private Date gmtLastQuotation;
   private Date	gmtLastSold;
   
   //其他属性
   private Part part;
   //
   private Integer gmtLastType;
   
	@Override
	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public Integer getCompanyId() {
		return companyId;
	}

	public void setCompanyId(Integer companyId) {
		this.companyId = companyId;
	}

	public Integer getPartId() {
		return partId;
	}

	public void setPartId(Integer partId) {
		this.partId = partId;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public Integer getSource() {
		return source;
	}

	public void setSource(Integer source) {
		this.source = source;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getNameEn() {
		return nameEn;
	}

	public void setNameEn(String nameEn) {
		this.nameEn = nameEn;
	}

	public String getPyCode() {
		return pyCode;
	}

	public void setPyCode(String pyCode) {
		this.pyCode = pyCode;
	}

	public String getMeasurementUnit() {
		return measurementUnit;
	}

	public void setMeasurementUnit(String measurementUnit) {
		this.measurementUnit = measurementUnit;
	}

	public Integer getPartCategoryId() {
		return partCategoryId;
	}

	public void setPartCategoryId(Integer partCategoryId) {
		this.partCategoryId = partCategoryId;
	}

	public String getLevel1Name() {
		return level1Name;
	}

	public void setLevel1Name(String level1Name) {
		this.level1Name = level1Name;
	}

	public String getLevel2Name() {
		return level2Name;
	}

	public void setLevel2Name(String level2Name) {
		this.level2Name = level2Name;
	}

	public Integer getLevel1Id() {
		return level1Id;
	}

	public void setLevel1Id(Integer level1Id) {
		this.level1Id = level1Id;
	}

	public String getDurability() {
		return durability;
	}

	public void setDurability(String durability) {
		this.durability = durability;
	}

	public BigDecimal getCost() {
		return cost;
	}

	public void setCost(BigDecimal cost) {
		this.cost = cost;
	}

	public BigDecimal getMinPrice() {
		return minPrice;
	}

	public void setMinPrice(BigDecimal minPrice) {
		this.minPrice = minPrice;
	}

	public BigDecimal getInsurancePrice() {
		return insurancePrice;
	}

	public void setInsurancePrice(BigDecimal insurancePrice) {
		this.insurancePrice = insurancePrice;
	}

	public Integer getMaxOnHand() {
		return maxOnHand;
	}

	public void setMaxOnHand(Integer maxOnHand) {
		this.maxOnHand = maxOnHand;
	}

	public Integer getMinOnHand() {
		return minOnHand;
	}

	public void setMinOnHand(Integer minOnHand) {
		this.minOnHand = minOnHand;
	}

	public Integer getOnHand() {
		return onHand;
	}

	public void setOnHand(Integer onHand) {
		this.onHand = onHand;
	}

	public Integer getOnWay() {
		return onWay;
	}

	public void setOnWay(Integer onWay) {
		this.onWay = onWay;
	}

	public String getPublicanLevel() {
		return publicanLevel;
	}

	public void setPublicanLevel(String publicanLevel) {

			this.publicanLevel = publicanLevel;
		
	}

	public String getSwapCode() {
		return swapCode;
	}

	public void setSwapCode(String swapCode) {
		this.swapCode = swapCode;
	}

	public Date getGmtCreate() {
		return gmtCreate;
	}

	public void setGmtCreate(Date gmtCreate) {
		this.gmtCreate = gmtCreate;
	}

	public Date getGmtModify() {
		return gmtModify;
	}

	public void setGmtModify(Date gmtModify) {
		this.gmtModify = gmtModify;
	}

	public Part getPart() {
		return part;
	}

	public void setPart(Part part) {
		this.part = part;
	}
	
	public boolean isDelete() {
		return isDelete;
	}

	public void setDelete(boolean isDelete) {
		this.isDelete = isDelete;
	}

	public String getCarModel() {
		return carModel;
	}

	public void setCarModel(String carModel) {
		this.carModel = carModel;
	}

	public Integer getQuotationQty() {
		return quotationQty;
	}

	public void setQuotationQty(Integer quotationQty) {
		this.quotationQty = quotationQty;
	}

	public Date getGmtLastQuotation() {
		return gmtLastQuotation;
	}

	public void setGmtLastQuotation(Date gmtLastQuotation) {
		this.gmtLastQuotation = gmtLastQuotation;
	}

	public Date getGmtLastSold() {
		return gmtLastSold;
	}

	public void setGmtLastSold(Date gmtLastSold) {
		this.gmtLastSold = gmtLastSold;
	}

	public String getBrand() {
		return brand;
	}

	public void setBrand(String brand) {
		this.brand = brand;
	}

	public String getOrigin() {
		return origin;
	}

	public void setOrigin(String origin) {
		this.origin = origin;
	}

	public BigDecimal getRetailPrice() {
		return retailPrice;
	}

	public void setRetailPrice(BigDecimal retailPrice) {
		this.retailPrice = retailPrice;
	}

	public Integer getGmtLastType() {
		return gmtLastType;
	}

	public void setGmtLastType(Integer gmtLastType) {
		this.gmtLastType = gmtLastType;
	}



	
	/**@Override
	public String toString() {
		return ReflectionToStringBuilder.toString(this); 
	}*/
}
